<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<div id="pagelet_welcome_box">
  <div class="UIImageBlock clearfix fbxWelcomeBox"> <a class="fbxWelcomeBoxBlock UIImageBlock_Image UIImageBlock_MED_Image"
                                                      <c:if test="${model.himself}">href="/bob-web/service/fileUpload.htm"</c:if>
                                                      <c:if test="${!model.himself}">href=""</c:if> 
                                                       tabindex="-1">
    <c:if test="${model.user.image == null}"><img class="img" width="100" height="100" src="/bob-web/user_images/no_photo.jpg"></c:if>
    <c:if test="${model.user.image != null}"><img class="img" width="100" height="100" src="/bob-web/user_images/${model.user.image}"></c:if>
    </a>
    <div class="prs UIImageBlock_Content UIImageBlock_MED_Content"> <a class="fbxWelcomeBoxName" href="/bob-web/service/homePage.htm">${model.user.name} ${model.user.surname}</a><br/>
      <br/>
      Location: <br/>
      <br/>
      ${model.user.location}<br/>
    </div>
  </div>
</div>
<div class="text_wrapper" style="border: solid #D8DFEA;border-top-width: 1px;border-right-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-top-style: solid;border-right-style: solid;border-bottom-style: solid;border-left-style: solid;border-top-color: #D8DFEA;border-right-color: #D8DFEA;border-bottom-color: #D8DFEA;border-left-color: #D8DFEA;margin-bottom: 20px;padding: 7px;padding-top: 7px;padding-right: 7px;padding-bottom: 7px;padding-left: 7px;">  </div>
<div id="pagelet_navigation">
  <div id="pagelet_nav_full">
    <div id="sideNav">
      <ul class="uiSideNav" id="pagelet_groups_nav">
        <div id="groupSideNavWrapper">
          <div id="groupSideNav">
            <div class="uiHeader uiHeaderTopBorder uiHeaderNav uiHeaderNavEmpty">
              <div class="clearfix uiHeaderTop">
                <div>
                  <h4 class="uiHeaderTitle"></h4>
                </div>
              </div>
            </div>
            <ul class="uiSideNav">
              <c:if test="${model.user.authority.authority=='ROLE_ADMIN' }">
                  <li>
                    <a class="item" href="/bob-web/service/approveUsers.htm" rel="dialog"> <span class="imgWrap"><i class="img spritemap_3ny6ul sx_91f418"></i></span> <span>Approve Users (Administrator)</span> </a>
                  </li>
              </c:if>

              <c:if test="${!model.himself && !model.isHeFriend && !model.friendshipApprovalWaiting}">
                  <li>
                    <a class="item" href="/bob-web/service/myFriends.htm?requestedUserId=${model.user.userId}&action=add" rel="dialog"> <span class="imgWrap"><i class="img spritemap_3ny6ul sx_91f418"></i></span> <span>Add Friend</span> </a>
                  </li>
              </c:if>
              <c:if test="${!model.himself && model.isHeFriend && model.friendshipApprovalWaiting}">
                  <li>
                    Friendship approval waiting...
                  </li>
              </c:if>
                <c:if test="${!model.himself && model.isHeFriend && !model.friendshipApprovalWaiting}">
                  <li>
                    <a class="item" href="/bob-web/service/myFriends.htm?requestedUserId=${model.user.userId}&action=remove" rel="dialog"> <span class="imgWrap"><i class="img spritemap_3ny6ul sx_91f418"></i></span> <span>Remove Friend</span> </a>
                  </li>
              </c:if>
			  <li>
                <c:if test="${!model.himself}"> <a class="item" href="/bob-web/service/profilePage.htm?wantedUserId=${model.user.userId}" rel="dialog"> <span class="imgWrap"><i class="img spritemap_3ny6ul sx_91f418"></i></span> <span>Profile</span> </a> </c:if>
              </li>

               <li> <c:if test="${model.himself}"> <a class="item" href="/bob-web/service/myFriends.htm" rel="dialog"> <span class="imgWrap"><i class="img spritemap_3ny6ul sx_91f418"></i></span> <span>My Friends</span> </a></c:if> </li>
               <li> <c:if test="${!model.himself}"> <a class="item" href="/bob-web/service/myFriends.htm?wantedUserId=${model.user.userId}" rel="dialog"> <span class="imgWrap"><i class="img spritemap_3ny6ul sx_91f418"></i></span> <span>Friends</span> </a> </c:if>  </li>
               <li> <c:if test="${!model.himself}"> <a class="item" href="/bob-web/service/usergroups.htm?wantedUserId=${model.user.userId}" rel="dialog"> <span class="imgWrap"><i class="img spritemap_3ny6ul sx_91f418"></i></span> <span>Groups</span> </a> </c:if>  </li>
               <li> <c:if test="${!model.himself}"> <a class="item" href="/bob-web/service/userevents.htm?wantedUserId=${model.user.userId}" rel="dialog"> <span class="imgWrap"><i class="img spritemap_3ny6ul sx_91f418"></i></span> <span>Events</span> </a> </c:if>  </li>

              <c:if test="${model.himself}">
                  <li> <a class="item" href="/bob-web/service/myFriendRequests.htm" rel="dialog"> <span class="imgWrap"><i class="img spritemap_3ny6ul sx_91f418"></i></span> <span>Friend Requests</span> </a> </li>
                  <li> <a class="item" href="/bob-web/service/usergroups.htm" rel="dialog"> <span class="imgWrap"><i class="img spritemap_3ny6ul sx_91f418"></i></span> <span>My Groups</span> </a> </li>
                  <li> <a class="item" href="/bob-web/service/userevents.htm" rel="dialog"> <span class="imgWrap"><i class="img spritemap_3ny6ul sx_91f418"></i></span> <span>My Events</span> </a> </li>
                  <li> <a class="item" href="/bob-web/service/inbox.htm" rel="dialog"> <span class="imgWrap"> <i class="img spritemap_3ny6ul sx_91f418"></i> </span> <span>MessageBox</span> </a> </li>
                  <li> <a class="item" href="/bob-web/service/newMessage.htm" rel="dialog"> <span class="imgWrap"><i class="img spritemap_3ny6ul sx_91f418"></i></span> <span>Compose Message</span> </a> </li>
              </c:if>

                <li>

                <c:if test="${!model.himself}"> <a class="item" href="/bob-web/service/newMessage.htm?toUserId=${model.user.userId}" rel="dialog"> <span class="imgWrap"><i class="img spritemap_3ny6ul sx_91f418"></i></span> <span>Send Message</span> </a> </c:if>
              </li>
              <li> <a class="item" href="/bob-web/logout" rel="dialog"> <span class="imgWrap"> <i class="img spritemap_3ny6ul sx_91f418"></i> </span> <span>Logout</span> </a> </li>
            </ul>
          </div>
        </div>
      </ul>
    </div>
  </div>
</div>
